<?php
namespace App\Models\Goods;

use Illuminate\Database\Eloquent\Model;

class Goods extends Model
{
    protected $guarded = array('id');

    public function goodsRecord()
    {
        return $this->hasMany('\App\Models\GoodsRecord\GoodsRecord', 'goods_id', 'id');
    }

    public function goodsType()
    {
        return $this->belongsTo('\App\Models\GoodsType\GoodsType', 'type_code', 'code');
    }
}
